witness: add optional device backing metadata to RowMajorMatrix#33
witness: add optional device backing metadata to RowMajorMatrix#33
Conversation
There was a problem hiding this comment.
Pull request overview
Adds optional device-backing metadata to witness::RowMajorMatrix so callers can attach an opaque device storage handle plus a layout tag.
Changes:
- Add
device_backing: Option<…>toRowMajorMatrixand initialize it toNonein constructors. - Introduce
DeviceMatrixLayoutand internalDeviceMatrixBacking. - Add public APIs to set/clear/query/downcast the device backing.
|
@copilot whenever the host side copy of |
…tations Agent-Logs-Url: https://github.com/scroll-tech/gkr-backend/sessions/b2424953-9b2e-4a0c-90b7-95fff6ff7006 Co-authored-by: kunxian-xia <1082586+kunxian-xia@users.noreply.github.com>
Head branch was pushed to by a user without write access
No—host-side updates are not automatically reflected on device storage. I’ve clarified this explicitly in |
Problem
GPU-side code needs a way to associate device-resident witness storage with
witness::RowMajorMatrixwithout coupling thewitnesscrate to a concrete device runtime.Approach
Add optional device-backing metadata to
RowMajorMatrix, including an opaque storage handle, layout enum, and small helper APIs to set, clear, query, and downcast the backing.Testing
No dedicated PR-level tests yet.
Risk / Rollout
Low surface-area API change in
witness, but correctness depends on keeping device metadata consistent with host-side matrix state.Copilot Reviewer Directive (keep this section)
When Copilot reviews this PR, apply
.github/copilot-instructions.mdstrictly.